package com.pipayshop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pipayshop.domain.Shop;
import com.pipayshop.domain.vo.ShopCommodityMinVo;
import com.pipayshop.domain.vo.ShopInfoVO;
import com.pipayshop.domain.vo.ShopVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author xiaoqiu
 * @date 2024/9/10 11:49
 * @description
 */
@Mapper
public interface OnlineStoreShopMapper extends BaseMapper<Shop> {
    Integer setShopScore();
    int updateDelFlag(List<String> deleteImageIds);
    @Select("select shop_upload_balance from shop_info where shop_id = #{shopId}")
    Integer getUploadBalance(String shopId);

    List<ShopCommodityMinVo> getShopCommodityInfo(@Param("shopId")String shopId,@Param("isDesc") Integer isDesc,@Param("page") Integer page,@Param("limit") Integer limit);


    Long selectAllFollowShopByUserId(String userId);

    List<ShopInfoVO> selectFollowShopByUserId(@Param("userId")String userId, @Param("page")Integer page,@Param("limit")Integer limit);

    List<ShopInfoVO> selectShopInfoByshopIdOrUserId(@Param("userId") String userId, @Param("shopId")String shopId);

    ShopVO selectBasicData(@Param("shopId") String shopId);

    List<ShopCommodityMinVo> getAllShopCommodityInfo(@Param("shopId")String shopId,@Param("isDesc") Integer isDesc,@Param("page") Integer page,@Param("limit") Integer limit);

    String selectUrl(String shopId);
}
